// To parse this JSON data, do
//
//     final actflLevelDescriptionData = actflLevelDescriptionDataFromJson(jsonString);

import 'dart:convert';

ActflLevelDescriptionResult actflLevelDescriptionResultFromJson(String str) =>
    ActflLevelDescriptionResult.fromJson(json.decode(str));

String actflLevelDescriptionResultToJson(ActflLevelDescriptionResult data) =>
    json.encode(data.toJson());

class ActflLevelDescriptionResult {
  ActflLevelDescriptionData? noviceLow;
  ActflLevelDescriptionData? noviceMid;
  ActflLevelDescriptionData? noviceHigh;
  ActflLevelDescriptionData? intermLow;
  ActflLevelDescriptionData? intermMid;
  ActflLevelDescriptionData? intermHigh;
  ActflLevelDescriptionData? advLow;
  ActflLevelDescriptionData? advHigh;

  ActflLevelDescriptionResult({
    this.noviceLow,
    this.noviceMid,
    this.noviceHigh,
    this.intermLow,
    this.intermMid,
    this.intermHigh,
    this.advLow,
    this.advHigh,
  });
  Map<String, dynamic> _toMap() {
    return {
      "Novice-Low": noviceLow!,
      "Novice-Mid": noviceMid!,
      "Novice-High": noviceHigh!,
      "Interm-Low": intermLow!,
      "Interm-Mid": intermMid!,
      "Interm-High": intermHigh!,
      "Adv-Low": advLow!,
      "Adv-high": advHigh!,
    };
  }

  dynamic get(String propertyName) {
    var _mapRep = _toMap();
    if (_mapRep.containsKey(propertyName)) {
      return _mapRep[propertyName]!;
    }
    return null;
  }

  factory ActflLevelDescriptionResult.fromJson(Map<String, dynamic> json) =>
      ActflLevelDescriptionResult(
        noviceLow: ActflLevelDescriptionData.fromJson(json["Novice-Low"]),
        noviceMid: ActflLevelDescriptionData.fromJson(json["Novice-Mid"]),
        noviceHigh: ActflLevelDescriptionData.fromJson(json["Novice-High"]),
        intermLow: ActflLevelDescriptionData.fromJson(json["Interm-Low"]),
        intermMid: ActflLevelDescriptionData.fromJson(json["Interm-Mid"]),
        intermHigh: ActflLevelDescriptionData.fromJson(json["Interm-High"]),
        advLow: ActflLevelDescriptionData.fromJson(json["Adv-Low"]),
        advHigh: ActflLevelDescriptionData.fromJson(json["Adv-high"]),
      );

  Map<String, dynamic> toJson() => {
        "Novice-Low": noviceLow?.toJson(),
        "Novice-Mid": noviceMid?.toJson(),
        "Novice-High": noviceHigh?.toJson(),
        "Interm-Low": intermLow?.toJson(),
        "Interm-Mid": intermMid?.toJson(),
        "Interm-High": intermHigh?.toJson(),
        "Adv-Low": advLow?.toJson(),
        "Adv-high": advHigh?.toJson(),
      };
}

class ActflLevelDescriptionData {
  List<DescriptionData>? reading;
  List<DescriptionData>? writing;
  List<DescriptionData>? speaking;
  List<DescriptionData>? listening;

  ActflLevelDescriptionData({
    this.reading,
    this.writing,
    this.speaking,
    this.listening,
  });

  Map<String, dynamic> _toMap() {
    return {
      'listening': listening,
      'speaking': speaking,
      'writing': writing,
      'reading': reading
    };
  }

  dynamic get(String propertyName) {
    var _mapRep = _toMap();
    if (_mapRep.containsKey(propertyName)) {
      return _mapRep[propertyName];
    }
    return null;
  }

  factory ActflLevelDescriptionData.fromJson(Map<String, dynamic> json) =>
      ActflLevelDescriptionData(
        reading: List<DescriptionData>.from(
            json["reading"].map((x) => DescriptionData.fromJson(x))),
        writing: List<DescriptionData>.from(
            json["writing"].map((x) => DescriptionData.fromJson(x))),
        speaking: List<DescriptionData>.from(
            json["speaking"].map((x) => DescriptionData.fromJson(x))),
        listening: List<DescriptionData>.from(
            json["listening"].map((x) => DescriptionData.fromJson(x))),
      );

  Map<String, dynamic> toJson() => {
        "reading": reading != null
            ? List<dynamic>.from(reading!.map((x) => x.toJson()))
            : null,
        "writing": writing != null
            ? List<dynamic>.from(writing!.map((x) => x.toJson()))
            : null,
        "speaking": speaking != null
            ? List<dynamic>.from(speaking!.map((x) => x.toJson()))
            : null,
        "listening": listening != null
            ? List<dynamic>.from(listening!.map((x) => x.toJson()))
            : null,
      };
}

class DescriptionData {
  String? summary;
  List<String>? contents;

  DescriptionData({
    this.summary,
    this.contents,
  });

  Map<String, dynamic> _toMap() {
    return {"summary": summary, "contents": contents};
  }

  dynamic get(String propertyName) {
    var _mapRep = _toMap();
    if (_mapRep.containsKey(propertyName)) {
      return _mapRep[propertyName];
    }
    return null;
  }

  factory DescriptionData.fromJson(Map<String, dynamic> json) =>
      DescriptionData(
        summary: json["summary"],
        contents: List<String>.from(json["contents"].map((x) => x)),
      );

  Map<String, dynamic> toJson() => {
        "summary": summary,
        "contents": contents != null
            ? List<dynamic>.from(contents!.map((x) => x))
            : null,
      };
}
